home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Resource Library: Multimedia
/
Resource Library: Multimedia.iso
/
hypercrd
/
xcmds
/
dvlprstc.hqx
/
Developer Stack 1.3r
/
card_19050.txt
< prev
next >
Wrap
Text File
|
1991-04-30
|
3KB
|
92 lines
-- card: 19050 from stack: in.3r
-- bmap block id: 0
-- flags: 0000
-- background id: 2202
-- name: osErr
----- HyperTalk script -----
on OsErr err
if err > 0 then -- XFCN convention
put "Parameter error with function" into errstr
else if err is -59 then
put "Problem during rename" into errstr
else if err is -54 then
put "Attempt to open locked file for writing" into errstr
else if err is -46 then
put "Volume locked by software" into errstr
else if err is -45 then
put "File locked" into errstr
else if err is -44 then
put "Volume locked by hardware" into errstr
else if err is -43 then
put "File not found" into errstr
else if err is -37 then
put "Bad volume or file name" into errstr
else if err is -36 then
put "I/O error" into errstr
else if err is -35 then
put "No such volume" into errstr
else if err is -34 then
put "Disk is full" into errstr
else if err is -49 then
put "File already open for writing" into errstr
else
put "Failed with error" && err into errstr
end if
answer errstr with "OK"
end OsErr
-- part contents for background part 10
----- text -----
7
-- part contents for background part 3
----- text -----
osErr
-- part contents for background part 2
----- text -----
--NOTE: Handlers are included in the Function section for convenience.
--
-- OsErr: for displaying Operating system error codes returned by
-- Sublaunch, RenameFile, MoveFile and DeleteFile, deProtect XFCNs & XCMDs.
-- From Dewi Williams
--
on OsErr err
-- Translate the most common ones
if err > 0 then -- XFCN convention
put "Parameter error with function" into errstr
else if err is -59 then
put "Problem during rename" into errstr
else if err is -54 then
put "Attempt to open locked file for writing" into errstr
else if err is -46 then
put "Volume locked by software" into errstr
else if err is -45 then
put "File locked" into errstr
else if err is -44 then
put "Volume locked by hardware" into errstr
else if err is -43 then
put "File not found" into errstr
else if err is -37 then
put "Bad volume or file name" into errstr
else if err is -36 then
put "I/O error" into errstr
else if err is -35 then
put "No such volume" into errstr
else if err is -34 then
put "Disk is full" into errstr
else if err is -49 then
put "File already open for writing" into errstr
else
put "Failed with error" && err into errstr
end if
answer errstr with "OK"
end OsErr
-- part contents for background part 19
----- text -----
Functions